<?php



require_once('../classes/MySQLdatabase.php');

class member extends MySQLdatabase{
public function getAdmin(){
        $this->connectDatabase();
        $sQuery = "SELECT username,password FROM member ORDER BY stud_lname ASC";
        $result = mysql_query($sQuery);
        $ctr = 0;
         
        while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
            $student[$ctr++] = array('id'=>$row['stud_id'],
                                     'lname'=>$row['stud_lname'],
                                     'fname'=>$row['stud_fname'],
                                     'mi'=>$row['stud_mi'],
                                     'gender'=>$row['stud_gender']);
        }
        
        if(!isset($student)){
            $student = null;
        }
        
        return $student;
    }
}
?>